package com.capacitydorm.server.web;

import com.capacitydorm.server.common.util.AESOperatorUtil;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class VisitLogListener {
    @KafkaListener(topics = {"dormLog"})
    public void listen(ConsumerRecord<?, ?> record) {
        String s1 = AESOperatorUtil.encryptString(record.value().toString());
        System.out.println(s1);
        String s = AESOperatorUtil.parseString(s1);
        System.out.println(s);
    }
}
